<template>
  <!-- 父子组件传值 -->
   <div>父级</div>
   <hr>
   <waterFallVue :list="list" ref="waterFall" @on-click="getName" :arr='[1,2,3]' :title="name"></waterFallVue>
</template>

<script setup lang='ts'>
import { ref, reactive, onMounted } from 'vue'
import waterFallVue from './components/water-fall.vue'
let name = "inzv"

const getName = (name: any)=>{
  console.log(name,"父组件");
  
}
const list:any[] = []
const waterFall = ref<InstanceType<typeof waterFallVue>>()
  // 接受defineExpose
onMounted(() => {
 console.log(waterFall.value?.name);
});
  


</script>

<style lang="less">
 html,body,#app{
   height: 100%;
   overflow: hidden;
 }
</style>